package org.example.decoder;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/**
 * 一个简单的配套处理器IntegerProcessHandler，用于处理MyByteToMessageDecoder解码之后的整数
 * @author hh
 * @since 2024/11/2
 */
public class IntegerProcessHandler extends ChannelInboundHandlerAdapter {
    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        Integer integer = (Integer) msg;
        System.out.println("收到一个整数：" + integer);
    }
}
